import request from '@/api/request/axios'

/** ***************************** 卡激活 **************************************/


//查询产品与借据列表
export const getProductList = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/ProductCreditLimit/queryProductCreditLimitRecord',
  method: 'post',
  data: params
})

// 产品额度注销记录查询
export const getCancelList = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/corporation/queryCustomerInfo',
  method: 'post',
  data: params
})


// 联网查询分数（两照对比）
export const queryOnlineScore = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/biometrics/photosCompare',
  method: 'post',
  data: params
})

// 现场照对比
export const queryCusSenceScore = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/biometrics/checkPerson',
  method: 'post',
  data: params
})

// OCR识别接口
export const ocrCusInfo = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/biometrics/IDCardIdentification',
  method: 'post',
  data: params
})

// 发送短信接口
export const sendCodeMessage = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/message/sendMessage',
  method: 'post',
  data: params
})

// 卡识别接口
export const ocrBankCard = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/biometrics/bankCardIdentification',
  method: 'post',
  data: params
})

// 卡激活状态和客户号查询接口
export const queryCusNum = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/corporation/queryDepositCustomerInfo',
  method: 'post',
  data: params
})

// 客户信息查询(根据客户号)
export const queryCusInfo = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/corporation/queryCustomerInfo',
  method: 'post',
  data: params
})

// 提交业务确认单接口
export const submitBizForm = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/transaction/activeDebitCard',
  method: 'post',
  data: params
})

// 提交业务凭证接口
export const submitBizCert = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/fileServer/imgLinkUpload',
  method: 'post',
  data: params
})

// 记录交易流水接口
export const saveTransPipeline = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/transaction/recodeTxnDetail',
  method: 'post',
  data: params
})

// 图片转base64
export const imgTransBase64 = (imgName) => request({
  url: window.CONFIG.fileServer + '/encodeBase64File?filename=' + imgName,
  method: 'get'
})

// 文件上传
export const uploadFile = (formData) => request({
  url: window.CONFIG.fileServer + '/put?filechannel=h5&filetype=jpg&tenantid=boc',
  method: 'post',
  data: formData,
  contentType: false,
  processData: false,
  dataType: 'text'
})

/** ************************************* 社保卡激活 ***************************************/

// 社保卡激活接口
export const socialCardActive = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/transaction/activeSsc',
  method: 'post',
  data: params
})

// 互联网支付功能开通接口
export const onlinePayOpen = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/transaction/activePaySign',
  method: 'post',
  data: params
})

/** ***************************************** 面签 ***************************************/

// 视频业务
export const queryVideoBizCert = (params) => request({
  url: window.CONFIG.bizServerUrl + '/v1/transaction/real',
  method: 'post',
  data: params
})

